{% extends "layout.html" %}

{% block title %}首页 - 金融数据平台{% endblock %}

{% block content %}
<div class="jumbotron bg-light p-5 rounded">
    <h1 class="display-4">金融数据平台</h1>
    <p class="lead">基于akshare、pandas、pandas_ta和PostgreSQL的全面金融数据采集、处理和分析系统</p>
    <hr class="my-4">
    <p>本平台支持股票、期货、加密货币、ETF、基金等多种投资标的的数据采集和分析，并提供宏观经济数据和新闻资讯的集成。</p>
    <div class="mt-4">
        {% if current_user.is_authenticated %}
        <a class="btn btn-primary btn-lg me-2" href="{{ url_for('dashboard') }}" role="button">
            <i class="fas fa-tachometer-alt me-1"></i>进入仪表盘
        </a>
        {% else %}
        <a class="btn btn-primary btn-lg me-2" href="{{ url_for('login') }}" role="button">
            <i class="fas fa-sign-in-alt me-1"></i>登录
        </a>
        <a class="btn btn-outline-primary btn-lg" href="{{ url_for('register') }}" role="button">
            <i class="fas fa-user-plus me-1"></i>注册
        </a>
        {% endif %}
    </div>
</div>

<div class="row mt-5">
    <div class="col-md-4 mb-4">
        <div class="card h-100">
            <div class="card-body">
                <h5 class="card-title"><i class="fas fa-chart-bar text-primary me-2"></i>数据收集</h5>
                <p class="card-text">收集多种金融数据，包括股票、期货、加密货币、ETF和基金等。使用akshare API确保数据的准确性和全面性。</p>
            </div>
        </div>
    </div>
    <div class="col-md-4 mb-4">
        <div class="card h-100">
            <div class="card-body">
                <h5 class="card-title"><i class="fas fa-cogs text-success me-2"></i>数据处理</h5>
                <p class="card-text">使用pandas进行数据清洗和标准化，pandas_ta计算各种技术指标，为投资决策提供有力支持。</p>
            </div>
        </div>
    </div>
    <div class="col-md-4 mb-4">
        <div class="card h-100">
            <div class="card-body">
                <h5 class="card-title"><i class="fas fa-database text-danger me-2"></i>数据存储</h5>
                <p class="card-text">利用PostgreSQL高性能关系型数据库，保证数据的高效存储和快速查询，支持海量数据处理。</p>
            </div>
        </div>
    </div>
</div>

<div class="row mt-3">
    <div class="col-md-4 mb-4">
        <div class="card h-100">
            <div class="card-body">
                <h5 class="card-title"><i class="fas fa-tasks text-warning me-2"></i>任务调度</h5>
                <p class="card-text">基于Celery的分布式任务系统，支持高并发数据采集和处理，确保任务的可靠执行和自动重试。</p>
            </div>
        </div>
    </div>
    <div class="col-md-4 mb-4">
        <div class="card h-100">
            <div class="card-body">
                <h5 class="card-title"><i class="fas fa-chart-line text-info me-2"></i>数据分析</h5>
                <p class="card-text">强大的数据可视化和分析工具，帮助用户洞察市场趋势，发现投资机会，制定明智的投资策略。</p>
            </div>
        </div>
    </div>
    <div class="col-md-4 mb-4">
        <div class="card h-100">
            <div class="card-body">
                <h5 class="card-title"><i class="fas fa-newspaper text-secondary me-2"></i>新闻资讯</h5>
                <p class="card-text">整合财经新闻和股票公告，结合宏观经济数据，为投资决策提供全面的信息支持。</p>
            </div>
        </div>
    </div>
</div>

<div class="mt-5 p-4 bg-light rounded">
    <h2 class="mb-4">支持的数据类型</h2>
    <div class="row">
        <div class="col-md-3 col-sm-6 mb-3">
            <div class="d-flex align-items-center">
                <i class="fas fa-money-bill-trend-up fa-2x text-success me-3"></i>
                <span>股票数据</span>
            </div>
        </div>
        <div class="col-md-3 col-sm-6 mb-3">
            <div class="d-flex align-items-center">
                <i class="fas fa-chart-simple fa-2x text-danger me-3"></i>
                <span>期货数据</span>
            </div>
        </div>
        <div class="col-md-3 col-sm-6 mb-3">
            <div class="d-flex align-items-center">
                <i class="fas fa-coins fa-2x text-warning me-3"></i>
                <span>加密货币</span>
            </div>
        </div>
        <div class="col-md-3 col-sm-6 mb-3">
            <div class="d-flex align-items-center">
                <i class="fas fa-chart-pie fa-2x text-primary me-3"></i>
                <span>ETF/指数</span>
            </div>
        </div>
        <div class="col-md-3 col-sm-6 mb-3">
            <div class="d-flex align-items-center">
                <i class="fas fa-piggy-bank fa-2x text-info me-3"></i>
                <span>基金数据</span>
            </div>
        </div>
        <div class="col-md-3 col-sm-6 mb-3">
            <div class="d-flex align-items-center">
                <i class="fas fa-newspaper fa-2x text-secondary me-3"></i>
                <span>财经新闻</span>
            </div>
        </div>
        <div class="col-md-3 col-sm-6 mb-3">
            <div class="d-flex align-items-center">
                <i class="fas fa-building-columns fa-2x text-dark me-3"></i>
                <span>宏观经济数据</span>
            </div>
        </div>
        <div class="col-md-3 col-sm-6 mb-3">
            <div class="d-flex align-items-center">
                <i class="fas fa-file-invoice-dollar fa-2x text-muted me-3"></i>
                <span>财务报表数据</span>
            </div>
        </div>
    </div>
</div>
{% endblock %}